package com.company.project.common.annotation;

import com.company.project.common.annotation.impl.FileTypeValidatorClass;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 自定义验证注解内容
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER,ElementType.FIELD})
@Constraint(validatedBy = FileTypeValidatorClass.class)
public @interface FileTypeValidator {
    //flag有效值多个使用“，”隔开
    String values();
    //提示内容
    String message() default "值必须为img或audio或file或video";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}